home *** CD-ROM | disk | FTP | other *** search
- -----------------------------------------------------------
- DLibs -> XDlibs
-
- To identify and include the XdLibs version in your program you have
- access to following variables:
- extern short _xdlibs; /* version number as BCD (print hex value) */
- extern char _xdlibs_date[]: /* modification date string */
- extern char __Ident_lib[]; /* a standard ident string */
-
- last modifications by Volker Seebode
-
- version 1.13 95/09/10
- added function prototypes
- full support of 32-bit integer and sizeof() returning type unsigned long
- new global var
- short ___intsize;
- holds value of sizeof(int)
-
- last modifications by jerry g geiger
-
- version 1.11
- __FWRT_BIN__ ist TRUE if the $UNIXMODE tag 'b' is defined
- new switch __FWRT_DEV_BIN__ for device streams
- new macro fpending(FILE *fp) and changes (therefore and others)
- in stdio functions
- fopenp() changed for any path searches and $UNIXMODE support.
- exec...() functions supported now, fork() and vfork()
- implemented
- new _unixmode_root() _unixmode_slash() and _unixmode_bin()
- functions
- [p]findfile() and fullpath() functions now use
- '/' and 'r<x>' tags from $UNIXMODE env variable
- see _unixmode...() functions
- debug functions / startup code changed:
- now cc forces ld to link new 'except.a' library if '-X'
- option is set. If a signal() function is available
- the debug code uses it instead of trap vectors.
- The message is written via Salert() function if posible, if
- not to stderr.
-
- version 1.10
- MiNT support changed - most functions try calls instead
- of version number checking
- osbind.h changed, new tosbind.h, new file.h and filesys.h
- osbind.h includes tosbind.h and mintbind.h now
- mintbind.h supports MiNT 1.12
- utime() can touch directories now
- fopen()/open() now faster if MiNT is running
- various changes to unistd functions & some more exist now
- bugfixes: string functions
-
- version 1.09
- some modules moved (linking system.o caused some errors)
- access to char *_extensions and char _spawn_ext[] enabled
- char * _getsuffixes() now documented function
- utime() fixed, still can't handle directories
- fstat(), lstat() added
-
- version 1.07
- new startup modules
-
- support of 8 Byte IEEE doubles; printf() only handles double
- floating point arguments!, scanf() double and float args
- you will need an hcc version > 2.24 (2.00x24) and
- corresponding top (2x22) and jas (2x10) versions!
-
- bugs fixed in:
- strtol(), strtoul(), spawn...(), fgetc() device mode
-
- changes:
- crtinit() switches to MiNT domain if MiNT is running cause the
- library functions need this!
-
- chdir() now checks Gemdos device (drive char)
-
- fgetw()..., fputw()... replace the former putw() etc functions
-
-
- Wed Oct 12 1994
- version 1.06
-
- function 'wild()' - FNRE matching tests
- is now moved to 'libextra.a'; And a variable
- 'char __EXCLUDE_CHAR__' exists to specify the not character
- for classes (default is '^').
-
- now two 'libc' files, one with floating point calculations support
- ('libc.a') and an integer only library ('libci.a', like previous
- libc.a' files).
- This is for soon there will be an hcc available with full IEEE
- support, and usually the 'libc.a' file contains all functions used
- for floating point support.
- cc will use the right library according to '-f' or '-lm' switches!
-
- xgemfast.h has changed, for hcc 2.00x23 now supports std bitfields!
- you will have to recompile all sources at once if you use
- hcc v2.00x23.
-
- the startup codes now support another cookie as variable:
- 'short _magx', with the version number found or 0 if not available.
-
- bug fixed in tempnam() and stdio.h (exist() == !access())
-
- version 1.05
- Jul 19 1994
- (official release)
- new file names: xdlibs library are now:
- xdlibs\libc.a, xdlibs\libextra.a
-
- div(), ldiv() implemented
- abs(), labs() implemented as functions,
- macros are now: _abs() and _labs()
-
- version 1.04
- Jul 06 1994
- bugs fixed in fread()
-
- Jun 27 1994
- changed:
- creat.o , spawn3.o
- spawn0.o (new, to reduce linking of unnecessary functions)
-
- fsize.o, now size.o, (function fsize() now called size(), cause f...
- functions refer to FILE struct handling functions)
-
- pfindfile.o (path searches now always - if no root path specified)
-
- bug in findfile.o fixed
-
- Jun 21 1994
- bugs fixed in creat.o,
-
- changed: startup modules, getenv.o, initeargs.o
- new: crtinit.o , consiste.o
- setup some variables and check buggy
- environment: new Variable: 'int __ASSUME_CONSITENT_ENV__'
- if != 0 (default) it is assumed that environment is
- consistent (i.e. if fist is correct all other
- strings are assumed to be correct, too)
- new: strictly.o
- new Variable 'int __STRICTLY_ARGV__'
- if != 0 only ARGV commandlines using 127 as length
- byte get used. (some programs don't do so - gulam!)
- default is 0 - FALSE.
- changed: main.o
- handling of stderr improved:
- now uses unchanged stderr (handle 2) if ARGV method
- was used calling this program, too.
-
- version 1.03
- Jun 17 1994
- line buffering implemented
- some functions changed:
- access() returns TRUE for error now (ANSI/POSIX)
- handles executable files now
- handles UNIX like filesystems (MiNT!) now
- stat(), chmod(), create(), open() (MiNT extensions)
- some constants changed, structure stat changed!!
- system() runs only with a shell now! don't uses _shell_p if
- MiNT is running
- _ttty() device input now emulates a std tty driver, never
- called if MiNT is running
- time functions splitted and changed!
- rawtime encoding changed: you can compare time_t rawtime
- values now, younger will be greater always!
- i/o buffered/FILES are flushed on exit again
- fgetc.o, main.o
- spawn functions:
- forkl...() removed;
- new spawn functions (names like old forkl...() functions
- wait() removed;
- lrealloc() implemented
- fputs() will add a newline if there was none;
- fread() and fwrite() work according to openmode (binary or text)
- __FRW_BIN__ and __FWRT_BIN__ implemented (changes the newline
- translating independent from open mode)
- __ident_lib implemented (char __ident_lib[]).
- to identify the XdLibs version you can type:
- 'ar p [path]xdlibs.a xdlibs.o' in your shell
- and you can read some strings from this object module.
- setvbuf() works as provided by standard now;
-
- version 1.02
- Fri Apr 15 1994
-
- Getcookie bug (testing pointer didn't work correctly) fixed.
-
-
- Sat Mar 5 1994
-
- new startup codes, new minimum.h, _mint flag now available
- new function GetMiNT(); is a dummy in programms using '*_s.o' and not
- minimum.h.
- (see xdlibs.txt for this)
-
- The wrong _main() function in XDlibs is replaced.
-
- unsigned int sleep(unsigned int seconds)
- changed to standard (unsigned); now with MiNT feature (using signal)
-
- void usleep(unsigned long usec)
- changed to standard (unsigned long micro seconds), MiNT feature
- (using Fselect(), so only milliseconds are taken into account!)
- This is not compatible with old implementation, but I think hardly
- anyone has used it.
-
- clock_t clock() now returns the CLK_TCKs since progamm start, as provided by
- standard, this works only if a '*_s.o' startup code was used.
- So I had to make some changes in extended.lib, too.
-
- In stddef.h a macro _XDLIBS is defined with the expected version number
- of the XDLIBS library. There is an 'int _xdlibs' in xdlibs.a, with the
- current version number. Highbyte is version, lowbyte is revision
-
- new function
- long teststack()
- returns the long number of Bytes unused stacksize. This may help
- you to calculate an appropriate _STKSIZ value.
- The accapp_s.o statup code has implemented this function, cause only
- the startup code itself knows where it's stack is located at
- runtime.
-
-
- version 1.01
- Fri Feb 25 1994
-
- some major changes with include files: stdlib.h, stdio.h unistd.h
- types.h is generally included with stddef.h now
- stddef.h is included by stdlib.h and stdio.h
- !!size_t is unsigned int now!!
- there is still a lot of work to do with header files and library stuff.
-
-
- int system(char *command)
- returns now TRUE if command is NULL and a shell is available
- makes use of new ARGV scheme (empty args), tokenizes command
- with quoted (',",`) strings as a shell expects it
-
- int chdir(char *path)
- A drive letter can be specified and will change the drive
- first.
-
- int forkl...
- names and parameters now really according to exec... calls
- IF YOU USED THIS FUNCTIONS SEE DOCUMENTS!!!!!!
- Now they return the childs return value!!!
- The functions use now ATARI's new ARGV scheme, the current
- (putenv(), modified) environment.
- errno and wait() will help you with some informations about
- the terminated or never created child.
-
- char *getenv(char *var)
- bug fixed
-
- int putenv(char *entry)
- completely rewritten, now it works correct, I hope.
-
- char *strncat(char *dest, char source, int len)
- bug fixed
-
- int atexit(void (*fnc)())
- you can store up to 32 functions now, called by exit while program
- termination
-
-
- calling main:
-
- _main() If main returns the value is passed to exit.
- stderr now is filehandle 2 if $STDERR ist set;
-
- _initargs() now retrives commandlines from Environment
- (ARGV scheme), including empty arguments
-
-
- -----------------------------------------------------------
- Änderungen von Holger Weets, Christian Wempe & Frank Specht
- Anmerkung: an dieser Datei wird nur gelegentlich, und wenn,
- dann in aller Eile geaendert, es koennen somit
- einander widersprechedne Teile enthalten sein
- -----------------------------------------------------------
- - Die Funktion 'crystal' wurde entfernt, da sie bei Verwendung der GEMFAST-
- Bibliothek nicht notwendig ist.
- - einige weniger oft verwendete Funktionen aus den XDLibs wurden in eine
- neue Bibliothek verschoben, so dass die XDLibs jetzt kuerzer sind
- (besonders fuer Ramdisk-Benutzer interessant) und das Linken schneller
- ist (der Linker hat weniger Symboltabellen zu untersuchen)
- Es sind dies u.a.:
- system, exec, die *fork* Funktionen, die Sortier-Funktionen, entab,
- detab, ostrap, die Profiling-Sachen, der Online-Debugger etc.
- Diese neue Bibliothek trägt den Namen 'EXTENDED.LIB'
-
-
- Einige Funktionen wurden in Assembler neu implementiert:
- --------------------------------------------------------
- STRSTR STRLEN STRCPY STRNCPY STRNCAT STRUPR STRCMP
- STRNCMP STRPOS STRRPOS STRRCHR MEMMOVE STRCAT STRLWR
- ATOI ATOL STRNICMP STRICMP BZERO STRDUP CTLCNV
- STRADJ MEMCHR MEMCMP MEMICMP MEMSET STRSET STRNSET
- STRPCPY MEMCCPY LMEMMOVE SUBSTR SUBNSTR STRTOK STRTRIM
- ITOA LTOA ULTOA STRSPN STRISTR FPRINTF VFPRINTF
- PRINTF VPRINTF STRRPL STRIRPL QSORT HSORT SWAB
- LMEMCPY STRREV STRRPBRK STRPBRK STRCSPN
-
- Autoren: Christian Wempe, Amiga & Holger Weets, Atari;
-
- Anmerkungen: - Für qsort() wird KEIN Buffer mehr benötigt, daß Anlegen der
- globalen Variablen '_qbuf' entfällt somit.
- - lmemcpy & memcpy sind eine Funktion mit 2 Einstiegspunkten
- - lmemmove & memmove -"-
- - strstr & stristr -"-
- - strrpl & strirpl -"-
- - read & lread -"-
- - write & lwrite -"-
-
- - Die Funktion calloc() wurde aus der Datei MALLOC.C entfernt
- und in eine eigene Datei verschoben. Bei Nicht-Verwendung von
- calloc() wurde diese bisher trotzdem gelinkt, dies ist jetzt
- nicht mehr der Fall.
-
- - bisher befanden sich die Funktionen open() und close() in der
- selben Datei. Da close() von fclose() aufgerufen wird, und
- diese Funktion wiederum von _main() (wird außer bei ACC's
- immer gelinkt), wurde auch open() immer gelinkt, auch wenn
- sie nicht verwendet wurde. Von dieser Funktion wiederum wurden
- access(), lseek() und creat() gelinkt (IMMER!) ...
-
- - bei Verwendung von cprintf() reicht jetzt (wie bei printf()
- auch) ein einfaches '\n' für ein Newline, da diese Funktion
- jetzt per cputc (siehe unten) ausgibt. Das lästige "\r\n"
- entfällt somit.
- Gleiches gilt für die Funktion cputs().
-
- - für den neuen Optimizer (V2.00x*) wurden die Funktionen
- strcmp() strcpy() strcat() strlen()
- strchr() strrchr() stricmp() strlwr()
- strupr() strrev() strpos()
- so umgeschrieben, daß sie schneller (und teilweise länger)
- sind als vorher, und ihre Parameter in Registern anstatt
- auf dem Stack erhalten.
- - die Funktion Ftell() befand sich nicht im Archiv, obwohl der
- Quelltext vorhanden war -- ergänzt
- - es sollte sich jetzt kein Modul mehr in den XDLibs befinden,
- welches eines der Symbole 'gemdos', 'bios' oder 'xbios'
- referenziert. Falls doch, zusätzlich die 'extended.lib'
- linken (nach den XDLIBS) und schon tut's wieder
-
- Ebenfalls neu geschrieben wurden:
- ----------------------------
- STRTOL STRTOUL TOUPPER TOLOWER MKDIR RMDIR REMOVE
- CHDIR CLOCK START_TIMER TIME_SINCE CHMOD WRITE LWRITE
- READ LREAD GETW GETL PUTW PUTL ACCESS
- FSIZE STAT
- von Holger Weets.
-
- Die Funktionen gemdos(), bios() und xbios() wurden aus den Startup's ent-
- fernt und unter dem Namen 'ostrap.o' in die XDlibs aufgenommen. Der Grund
- hierfür ist, daß der Compiler (HCC) jetzt keine Aufrufe dieser Funktionen
- mehr erzeugt, sondern direkt die 'trap' - Instruktionen generiert, was sowohl
- kürzer als auch mehr als doppelt so schnell ist.
-
- Nach und nach werde ich immer mehr der sonstigen XDLibs - Funktionen neu
- übersetzen, damit sie
- a) kürzer werden wegen
- - neuer HCC (traps)
- - neuer TOP (mehr Optimierung)
- b) an den neuen Symbol-Tabellen-Standard (V2.0*) angepasst werden
- (beliebig lange Namen)
-
-
- Neu in die DLibs aufgenommen wurden die Funktionen:
- ---------------------------------------------------
- void (*_userexit)()
- Dieser Zeiger auf eine Funktion kann vom Programm jederzeit mit
- einem Wert belegt werden. Die Funktion exit() prüft diesen Wert
- und falls er nicht 0 ist, wird die Funktion aufgerufen, auf die
- <_userexit> zeigt. Praktisch, um z.B. Dateien noch zu schliessen,
- temporäre Dateien zu löschen oder Vektoren wieder gerade zu biegen.
- exit() wird von main() übrigens automatisch aufgerufen.
-
- void ChkAbort()
- Testet, ob Ctrl-C gedrückt wurde und ruft ggfls. exit() auf. Außerdem
- wird die Zeichenkette "^C" auf den Bildschirm ausgegeben.
-
- int cputc(char c)
- Das Zeichen <c> wird auf die Console ausgegeben (per Bconout(2, c)).
- Falls das Zeichen '\n' ist, so wird außerdem ein '\r' ausgegeben.
- Diese Funktion wird von cprintf() und cputs() verwendet.
-
- char *detab(char *string, int tabsize)
- Alle Tabs in string werden durch Spaces ersetzt, wobei als Tabulator-
- weite tabsize angenommen wird.
-
- char *entab(char *string, int tabsize)
- Alle Spaces in string werden durch Tabs ersetzt, wobei als Tabulator-
- weite tabsize angenommen wird.
-
- void memswap(char *p1, char *p2, int len)
- Die Speicher-Bereiche ab p1/p2 werden vertauscht, und zwar len Bytes.
-
- int strwrap(char *dest, char *src, int len)
- Der String src wird auf eine max. Länge von len gebracht, wobei bei
- Blanks getrennt wird. Dieser Bereich wird nach dest kopiert und aus src
- gelöscht.
- Zurückgegeben wird die neue Länge von src.
-
- int strcstrp(char *string, char ch)
- Alle aufeinanderfolgenden Vorkommen von ch in string werden entfernt.
- Beispiel: strcstrp("Hallo Welt", ' ') wird zu "Hallo Welt".
- Zurückgegeben wird die neue Länge von string.
-
- char *strdcat(char *str1, char *str2)
- Alloziiert per malloc() soviel Speicher, wie für die Aufnahme beider
- Strings notwendig ist, und schreibt sie hintereinander in diesen.
-
- char *strvcat(anz, dest, src1, src2, ..., srcN)
- Die Strings src1 - scrN werden nacheinander in dest kopiert.
- Beispiel: strvcat(5, p, "Dies ", "ist ", "ein ", "Test"); in <p> stehe
- bereits: "Ausgabe: ";
- ergibt "Ausgabe: Dies ist ein Test"
- Der Parameter anz gibt dabei die Anzahl ALLER noch folgenden Parameter an.
-
- char *strvcpy(anz, dest, scr1, scr2, ..., scrN)
- Die Strings src1 - scrN werden nacheinander in dest kopiert.
- Beispiel: strvcat(5, p, "Dies ", "ist ", "ein ", "Test"); in <p> stehe
- bereits: "Ausgabe: ";
- ergibt "Dies ist ein Test" (OHNE "Ausgabe: ", weil überschrieben wird!!!)
- Der Parameter anz gibt dabei die Anzahl ALLER noch folgenden Parameter an.
-
- int strblk(char *str, int len)
- Formatiert <str> auf Blocksatz mit Länge <len>.
- Zurückgeliefert wird ein Wert <>0, falls alles geklappt hat
-
- char *basename(char *path)
- Liefert einen Zeiger auf das dem letzten Backslash folgende Zeichen.
- Falls <path> also einen Dateinamen enthält, so liefert basename() einen
- Zeiger auf diesen. Falls <path> überhaupt keinen Backslash enthält, so
- liefert die Funktion einen Zeiger auf das erste Zeichen von <path>, also
- wieder einen Zeiger auf den Dateinamen. Falls <path> mit einem Backslash
- endet, wird ein Zeiger auf des Stringende zurückgegeben.
-
- char *suffix(char *path)
- Liefert einen Zeiger auf die Endung (Extension, Suffix) des uebergebenen
- Argumentes (Dateiname mit/ohne Pfad). Der Zeiger steht AUF dem '.'
- Falls die Datei keine Endung enthält, steht der Zeiger auf dem String-
- Ende, also dem 0-Zeichen.
-
- void cwd(char *path)
- Liefert in <path> den aktuellen Zugriffspfad zurück. Das Ergebnis ist das
- gleiche, wie von getcwd(), bloß
- - ist cwd() kürzer
- - liefert cwd() den Pfad in Großbuchstaben, und nicht, wie getcwd(), in
- Kleinbuchstaben.
-
- int index(char *str, char c)
- Wie strpos, aus Kompatibiliäts-Gründen.
-
- int rindex(xhr *str, char c)
- Wie strrpos, aus Kompatibiliäts-Gründen.
-
- prof.o; Funktionen für das im Compiler eingebaute Profiling; enthält:
- void _prolog(char *name)
- wird am Anfang jeder Funktion aufgerufen, <name> ist der Name der
- Funktion
- void _epilog(char *name)
- wird am Ende jeder Funktion aufgerufen, <name> ist der Name der
- Funktion
- void _savepro()
- wird direkt vor Programm-Ende (von __exit()) aufgerufen und speichert
- die Profiling-Tabelle in einer Datei Namens 'PROF.OUT'. Funktioniert
- nur dann automatisch, wenn der zugehörige Startup-Code verwendet wird
- (prof_s.o).
-
-
- Amiga-Version von Christian Wempe
- ST-Version von Holger Weets
-
-